// 定义Formily Schema的类型
export interface FormilySchema {
  type?: string
  properties?: Record<string, FormilySchema>
  enum?: any[]
  'x-decorator'?: string
  'x-component'?: string
  'x-component-props'?: Record<string, any>
  'x-validator'?: any[]
  'x-reactions'?: any
  'x-designable-id'?: string
  'x-index'?: number
  default?: any
  description?: string
  title?: string
  required?: string[] | boolean
  items?: FormilySchema
  additionalProperties?: boolean | FormilySchema
  dependencies?: any
  [key: string]: any // 允许任意其他属性
}

// 页面配置类型
export interface PageConfig {
  labelCol?: number
  wrapperCol?: number
  languagePackage?: string
  [key: string]: any
}

// 完整的页面 Schema 类型（包含 page 和 schema）
export interface PageSchema {
  page?: PageConfig
  schema?: FormilySchema
  [key: string]: any
}

// 组件信息接口
export interface ComponentInfo {
  name: string
  path: string
  schema: FormilySchema
  category?: string
  description?: string
}

// JSON Schema类型
export interface JsonSchema {
  $schema: string
  type: string
  properties?: Record<string, any>
  required?: string[]
  additionalProperties?: boolean
  items?: any
  enum?: any[]
  description?: string
  title?: string
}

// 生成选项
export interface GenerateOptions {
  includeFormilyProps?: boolean
  includeValidation?: boolean
  includeReactions?: boolean
  outputFormat?: 'json' | 'yaml'
  targetPath?: string
}
